﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderS.aspx.cs" Inherits="RGPWEB.CH.OrderS.OrderS" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<link href="../../inc/Style/index.css" rel="Stylesheet" type="text/css" />
<link href="../../inc/Style/contentstyle.css" rel="Stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../../inc/script/pub.js"></script>
<script language="javascript" type="text/javascript" src="../../../../inc/Script/My97DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript">
    function ShoPage(strURL) {
        var wintmp = window.open(strURL, null, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no");
        return true;
    }

    function CountRWeight() {
        var txtlong = 0;
        var txtwidth = 0;
        var txtheight = 0;
        if (!isNaN(document.getElementById("txt_long").value)) {
            txtlong = document.getElementById("txt_long").value
        } else {
            alert("长度不为数字，请重新录入！");
            return false;
        }
        if (!isNaN(document.getElementById("txt_width").value)) {
            txtwidth = document.getElementById("txt_width").value
        }
        else {
            alert("长度不为数字，请重新录入！");
            return false;
        }
        if (!isNaN(document.getElementById("txt_height").value)) {
            txtheight = document.getElementById("txt_height").value
        }
        else {
            alert("长度不为数字，请重新录入！");
            return false;
        }
        //alert(txtlong);
        document.getElementById("txt_RWeight").value = txtlong * txtwidth * txtheight / 5000;

    }
    </script> 
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div class="title">    
            <h1 class="on"><a href="OrderSList.aspx">订单列表</a></h1>
             <h1><a href="javascript:void(0)">新增\编辑订单</a></h1>
        </div>
        
        <div >
            <table width="100%">
                <tr>
                    <td>
                         <fieldset>
                            <asp:Panel ID="pal_orderno" runat="server">
                                运单号：<asp:TextBox ID="txt_orderNo" runat="server" onblur="if(!CheckName(this.value)){alert('运单号只能是数字或者字母！');this.value=''}"></asp:TextBox>
                                &nbsp;&nbsp; 发件日期：<asp:TextBox ID="txt_SendDate" runat="server" onClick='WdatePicker()' ></asp:TextBox>
                                &nbsp;&nbsp; 客户：
                                 
                                <asp:ComboBox ID="cmb_list" runat="server" AutoCompleteMode="SuggestAppend" 
                                    DropDownStyle="DropDownList" AutoPostBack="True" 
                                    onselectedindexchanged="cmb_list_SelectedIndexChanged">
                                </asp:ComboBox>
                                <asp:ToolkitScriptManager ID="ScriptManager1" runat="server" />
                            </asp:Panel>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID ="pal_send" runat="server" Width="100%">
                            <fieldset id="sendinfo" style="width: 47%; display :inline; float: left;">
                                <legend>发件人信息</legend>
                                <table width="100%">
                                    <tr>
                                        <td style="text-align: right">发件人：</td>
                                        <td style="color: #FF0000">
                                            <asp:TextBox ID="txt_sendmen" runat="server" Width="100px" onblur="if(!IsEmpty(this.value)){alert('寄件人不能为空！');}"></asp:TextBox>
                                            *</td>
                                        <td style="text-align: right">电话：</td>
                                        <td style="color: #FF0000">
                                            <asp:TextBox ID="txt_sendtel" runat="server" Width="100px" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"></asp:TextBox>
                                            *</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">Ref：</td>
                                        <td>
                                            <asp:TextBox ID="txt_sendref" runat="server" Width="100px"></asp:TextBox>
                                        </td>
                                        <td style="text-align: right">EID：</td>
                                        <td>
                                            <asp:TextBox ID="txt_sendeid" runat="server" Width="100px" onblur="if(!IsNum(this.value,10)){alert('只能输入十位字符！');}"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">公司名称：</td>
                                        <td>
                                            <asp:TextBox ID="txt_sendcompany" runat="server" Width="140px"></asp:TextBox>
                                        </td>
                                        <td style="text-align: right">
                                            邮编：</td>
                                        <td>
                                            <asp:TextBox ID="txt_sendpostcode" runat="server" Width="100px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">地址：</td>
                                        <td colspan="3" style="color: #FF0000">
                                            <asp:TextBox ID="txt_sendadd" runat="server" Width="366px"></asp:TextBox>
                                            *</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">国家：</td>
                                        <td >
                                            <asp:DropDownList ID="ddl_sendcountry" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td style="text-align: right">
                                            城市：</td>
                                        <td>
                                            <asp:TextBox ID="txt_sendcity" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>
                                            &nbsp;</td>
                                        <td></td>
                                        <td>
                                            <asp:Button ID="btn_sendsave" runat="server" Text="保存" 
                                                onclick="btn_sendsave_Click" />
                                            <input type="button" value="档案" id="btn_sendfile" onclick="ShoPage('SelectSend.aspx')" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                            <fieldset id="receptioninfo" style="width: 47%; display :inline; float: right;">
                                <legend>收件人信息</legend>
                                <table width="100%">
                                    <tr>
                                        <td style="text-align: right">收件人：</td>
                                        <td style="color: #FF0000">
                                            <asp:TextBox ID="txt_recmen" runat="server" Width="100px" onblur="if(!IsEmpty(this.value)){alert('收件人不能为空！');}"></asp:TextBox>
                                            *</td>
                                        <td style="text-align: right">电话：</td>
                                        <td style="color: #FF0000">
                                            <asp:TextBox ID="txt_rectel" runat="server" Width="100px" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"></asp:TextBox>
                                            *</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">EID：</td>
                                        <td>
                                            <asp:TextBox ID="txt_receid" runat="server" Width="100px" onblur="if(!IsNum(this.value,10)){alert('只能输入十位字符！');}"></asp:TextBox>
                                        </td>
                                        <td style="text-align: right" >邮编：</td>
                                        <td>
                                            <asp:TextBox ID="txt_recpostcode" runat="server" Width="100px" onblur="if(!IsEmpty(this.value)){alert('邮政编码不能为空！');}"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">公司名称：</td>
                                        <td colspan="3">
                                            <asp:TextBox ID="txt_reccompany" runat="server" Width="366px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right" >地址：</td>
                                        <td colspan="3" style="color: #FF0000" >
                                            <asp:TextBox ID="txt_receadd" runat="server" Width="366px"></asp:TextBox>
                                            *</td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">国家：</td>
                                        <td>
                                            <asp:DropDownList ID="ddl_reccountry" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td style="text-align: right">
                                            城市：</td>
                                        <td>
                                            <asp:TextBox ID="txt_reccity" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                        <td></td>
                                        <td>
                                            <asp:Button ID="btn_recsave" runat="server" Text="保存" 
                                                onclick="btn_recsave_Click" />
                                            <input type="button" value="档案" id="btn_reption" onclick="ShoPage('SelectReception.aspx')" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pal_packag" runat="server">
                            <fieldset style="display: table">
                                <legend>包装类型</legend>
                                <table width="100%">
                                    <tr>
                                        <td style="text-align: left">
                                            <asp:RadioButtonList ID="rbl_paketype" runat="server" Height="16px" 
                                                RepeatDirection="Horizontal" Width="503px">
                                                <asp:ListItem>信封</asp:ListItem>
                                                <asp:ListItem>包装袋</asp:ListItem>
                                                <asp:ListItem>硬纸箱</asp:ListItem>
                                                <asp:ListItem>其它</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>                                
                                    </tr>
                                </table>
                            </fieldset>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pal_shipment" runat="server">
                            <fieldset id="fil_shipment">
                                <legend>托运货物的材料</legend>
                                <table width="100%">
                                    <tr>
                                        <td colspan="6">总包装数：<asp:TextBox ID="txt_num" runat="server" Width="66px" onblur="if(!IsPlusInt(this.value)){alert('只能输入整数！');this.value=''}"></asp:TextBox>
                                            总重量：<asp:TextBox ID="txt_weightlb" runat="server" Width="60px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                            LB<asp:TextBox ID="txt_weightkg" runat="server" Width="60px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                            KG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 体积：（长：<asp:TextBox 
                                                ID="txt_long" runat="server" Width="30px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                            宽：<asp:TextBox ID="txt_width" runat="server" Width="30px" 
                                                onblur="if(!IsPlusFloat(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                            高：<asp:TextBox ID="txt_height" runat="server" Width="30px" 
                                                onblur="CountRWeight()"></asp:TextBox>
                                            ）</td>
                                    </tr>
                                    <tr><td colspan="6" style="height:12px"></td></tr>
                                    <tr>
                                        <td style="width:30%">货物名称</td>
                                        <td>HS编码</td>
                                        <td>原产地</td>
                                        <td>数量</td>
                                        <td>价格</td>
                                        <td>金额</td>
                                    </tr>
                                     <tr><td colspan="6" style="height:12px"></td></tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="txt_product0" runat="server" Width="207px"></asp:TextBox>
                                            <asp:HiddenField ID="hif_product0" runat="server" />
                                        </td>
                                        <td><asp:TextBox ID="txt_cuscode0" runat="server" Width="149px"></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_place0" runat="server" Width="137px"></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_num0" runat="server" Width="54px" onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox></td>
                                        <td>$<asp:TextBox ID="txt_price0" runat="server" Width="60px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}" 
                                                AutoPostBack="True" Height="22px" ontextchanged="txt_price0_TextChanged"></asp:TextBox></td>
                                        <td>$<asp:TextBox ID="txt_totalprice0" runat="server" Width="79px" onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="txt_product1" runat="server" Width="204px"></asp:TextBox>
                                            <asp:HiddenField ID="hif_product1" runat="server" />
                                        </td>
                                        <td><asp:TextBox ID="txt_cuscode1" runat="server" Width="149px"></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_place1" runat="server" Width="137px"></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_num1" runat="server" Width="54px" onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox></td>
                                        <td>$<asp:TextBox ID="txt_price1" runat="server" Width="60px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}" 
                                                AutoPostBack="True" ontextchanged="txt_price1_TextChanged"></asp:TextBox></td>
                                        <td>$<asp:TextBox ID="txt_totalprice1" runat="server" Width="79px" onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox></td>
                                    </tr>
                                   <tr>
                                        <td>
                                            <asp:TextBox ID="txt_product2" runat="server" Width="200px"></asp:TextBox>
                                            <asp:HiddenField ID="hif_product2" runat="server" />
                                        </td>
                                        <td><asp:TextBox ID="txt_cuscode2" runat="server" Width="149px"></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_place2" runat="server" Width="137px"></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_num2" runat="server" Width="54px" onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox></td>
                                        <td>$<asp:TextBox ID="txt_price2" runat="server" Width="60px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}" 
                                                AutoPostBack="True" ontextchanged="txt_price2_TextChanged"></asp:TextBox></td>
                                        <td>$<asp:TextBox ID="txt_totalprice2" runat="server" Width="79px" onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            总计：</td>
                                        <td>
                                            $<asp:TextBox ID="txt_totalprice3" runat="server" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}" 
                                                ReadOnly="True" Width="79px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">
                                            备注：<asp:TextBox ID="txt_demo" runat="server" Rows="5" TextMode="MultiLine" 
                                                Width="800px"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pal_other" runat="server">
                            <fieldset>
                                <legend>其它信息</legend>
                                <table width="100%">
                                    <tr>
                                        <td>付款方式：</td>
                                        <td>
                                            <asp:DropDownList ID="ddl_paytype" runat="server">
                                                <asp:ListItem Value="0">--请选择--</asp:ListItem>
                                                <asp:ListItem Value="1">现金</asp:ListItem>
                                                <asp:ListItem Value="2">支票</asp:ListItem>
                                                <asp:ListItem Value="3">信用卡</asp:ListItem>
                                                <asp:ListItem Value="4">银行转账</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            付款账号：</td>
                                        <td>
                                            <asp:TextBox ID="txt_paynum" runat="server"></asp:TextBox>
                                        </td>
                                        <td>
                                            内件数量：</td>
                                        <td>
                                            <asp:TextBox ID="txt_innum" runat="server" Width="90px" 
                                                onblur="if(!IsPlusInt(this.value)){alert('只能输整数！');this.value=''}"></asp:TextBox>
                                        </td>
                                        <td>业务员：</td>
                                        <td>
                                            <asp:TextBox ID="txt_salemen" runat="server" Width="90px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>收费重量：</td>
                                        <td>
                                            <asp:TextBox ID="txt_RWeight" runat="server" Width="90px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                        </td>
                                        <td>
                                            折扣 ：</td>
                                        <td>
                                            <asp:TextBox ID="txt_rate" runat="server" Width="100px"></asp:TextBox>
                                        </td>
                                        <td>
                                            运费：</td>
                                        <td>
                                            <asp:TextBox ID="txt_Freight" runat="server" Width="90px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                        </td>
                                        <td>价值：</td>
                                        <td>
                                            <asp:TextBox ID="txt_Declare" runat="server" Width="90px" 
                                                onblur="if(isNaN(this.value)){alert('只能输数字！');this.value=''}"></asp:TextBox>
                                            
                                            <asp:DropDownList ID="ddl_CurrencyType" runat="server">
                                                <asp:ListItem Value="0">--选择--</asp:ListItem>
                                                <asp:ListItem Value="1">人民币</asp:ListItem>
                                                <asp:ListItem Value="2">美元</asp:ListItem>
                                                <asp:ListItem Value="3">欧元</asp:ListItem>
                                                <asp:ListItem Value="4">英镑</asp:ListItem>
                                                <asp:ListItem Value="5">卢布</asp:ListItem>
                                                <asp:ListItem Value="6">日元</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">取件商：
                                            <asp:DropDownList ID="ddl_trust" runat="server">
                                            </asp:DropDownList>
                                            取件人：<asp:TextBox ID="txt_trustmen" runat="server"></asp:TextBox>
                                             
                                        </td>
                                        <td colspan="3">转运商：
                                            <asp:DropDownList ID="ddl_ford" runat="server">
                                            </asp:DropDownList>
                                            转运单号：<asp:TextBox ID="txt_refno" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            <asp:HiddenField ID="hif_id" runat="server" />
                                            <asp:HiddenField ID="hif_cid" runat="server" />
                                        </td>
                                        <td colspan="3">
                                            <asp:Button ID="btn_save" runat="server" Text="保存" onclick="btn_save_Click" />
                                            <asp:Button ID="btn_cance" runat="server" Text="取消" 
                                                onclick="btn_cance_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
